package skyinline.swing_outline;

import java.awt.BorderLayout;
import java.awt.EventQueue;

import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.UIManager;
import javax.swing.border.EmptyBorder;

import ch.randelshofer.quaqua.QuaquaManager;
import javax.swing.JButton;
import javax.swing.JTable;
import javax.swing.JComboBox;
import javax.swing.BoxLayout;
import javax.swing.SpringLayout;
import javax.swing.JProgressBar;
import javax.swing.JToggleButton;
import javax.swing.JSeparator;
import javax.swing.JScrollBar;
import javax.swing.JSlider;
import javax.swing.JSpinner;
import javax.swing.JPasswordField;
import javax.swing.JRadioButton;

/**
 *	스윙 프로그램 모양과 느낌 변경
 *	javax.swing.UIManager 클래스의 setLookAndFeel 메서드를 사용
 *	com.sun.java.swing.plaf.gtk.GTKLookAndFeel
 *	javax.swing.plaf.metal.MetalLookAndFeel
 *	com.sun.java.swing.plaf.windows.WindowsLookAndFeel
 *	com.sun.java.swing.plaf.motif.MotifLookAndFeel
 *	com.sun.java.swing.plaf.nimbus.NumbusLookAndFeel
 *
 *	JFrame.setDefaultLookAndFeelDecorated(true);
 * 	UIManager.serLookAndFeel( 룩앤필명칭 );
 * 
 * 	MacOSX 와 비슷하게 lookandfeel 을 제공하는 사이트
 * www.randelshofer.ch/quaqua/
 */

public class J06_HelloSwingLookAndFeel extends JFrame {

	/**
	 * Launch the application.
	 */
	public static void main(String[] args) {
		//	quaqua 룩앤필 적용 (1)
		System.setProperty("Quaqua.tabLayoutPolicy", "wrap");
		
		EventQueue.invokeLater(new Runnable() {
			public void run() {
				try {
					JFrame.setDefaultLookAndFeelDecorated(true);
					//	quaqua 룩앤필 적용(2)
					UIManager.setLookAndFeel(QuaquaManager.getLookAndFeel());
					
					J06_HelloSwingLookAndFeel frame = new J06_HelloSwingLookAndFeel();
					//	Look And Feel 지정
					//	UIManager.setLookAndFeel("javax.swing.plaf.metal.MetalLookAndFeel");
					
					frame.setVisible(true);
				} catch (Exception e) {
					e.printStackTrace();
				}
			}
		});
	}

	/**
	 * Create the frame.
	 */
	public J06_HelloSwingLookAndFeel() {
		setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		setBounds(100, 100, 400, 200);
		
		JButton button = new JButton("다음");
		getContentPane().add(button, BorderLayout.EAST);
		
		JButton btnNewButton = new JButton("이전");
		getContentPane().add(btnNewButton, BorderLayout.WEST);
		
		JToggleButton tglbtnCenter = new JToggleButton("CENTER");
		getContentPane().add(tglbtnCenter, BorderLayout.CENTER);
		
		JSlider slider = new JSlider();
		getContentPane().add(slider, BorderLayout.NORTH);
		
		JSlider slider_1 = new JSlider();
		getContentPane().add(slider_1, BorderLayout.SOUTH);
	}

}
